import request from 'UTIL/request';

/**
 * 公告添加/修改
 * @param params
 */
export function AddAnnouncement(params) {
  return request({
    url: 'oaAnnouncement/addAnnouncement',
    method: 'POST',
    data: params
  });
}

/**
 * 公告修改
 * @param params
 */
export function UpdateAnnouncement(params) {
  return request({
    url: 'oaAnnouncement/setAnnouncement',
    method: 'POST',
    data: params
  });
}

/**
 * 公告删除接口
 * @param params
 */

export function DeleteNotice(params) {
  return request({
    url: `oaAnnouncement/delete/${params.id}`,
    method: 'POST'
  });
}

/**
 * 公告查看详情接口
 * @param params
 */
export function QueryById(params) {
  return request({
    url: `oaAnnouncement/queryById/${params.id}`,
    method: 'POST'
  });
}

/**
 * 倒序查询公告列表
 * @param params
 */
export function QueryList(params) {
  return request({
    url: 'oaAnnouncement/queryList',
    method: 'POST',
    data: params
  });
}

/**
 * 公告设为已读
 * @param params
 */
export function ReadNotice(params) {
  return request({
    url: 'oaAnnouncement/readAnnouncement',
    method: 'POST',
    data: params
  });
}
